﻿// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_INV_MTRL_TRANS_ITEM
// * CreateDate    : 2014/3/11 11:22:06
// * Creater       : CodeSmith
// * LastChangeDate: 2014/3/11 11:22:06
// * LastChanger   : 2014/3/11 11:22:06
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Suzsoft.Smart.Data;
using ESOL.Common.Entity;

namespace ESOL.Business.Inv
{
    /// <summary>
    /// InvMtrlTransItem
    /// </summary>
    public partial class InvMtrlTransItemBs
    {
        #region GetByID
        /// <summary>
        /// Get Entity
        /// </summary>
        /// <param name="objInvMtrlTransItemEntity">Entity</param>
        /// <returns>Entity</returns>
        public static InvMtrlTransItemEntity GetInvMtrlTransItem(InvMtrlTransItemEntity objInvMtrlTransItemEntity)
        {
            return DataAccess.SelectSingle<InvMtrlTransItemEntity>(objInvMtrlTransItemEntity);
        }
        #endregion


        #region Insert
        /// <summary>
        /// Insert Data
        /// </summary>
        /// <param name="objInvMtrlTransItemEntity">Entity</param>
        /// <returns>true Insert Succeed; false Insert Fail</returns>
        public static bool InsertInvMtrlTransItem(InvMtrlTransItemEntity objInvMtrlTransItemEntity)
        {
            return DataAccess.Insert(objInvMtrlTransItemEntity);
        }

        public static bool InsertInvMtrlTransItem(List<InvMtrlTransItemEntity> objInvMtrlTransItemEntityList)
        {
            return DataAccess.Insert(objInvMtrlTransItemEntityList);
        }
        #endregion


        #region Update
        /// <summary>
        /// Update Data
        /// </summary>
        /// <param name="objInvMtrlTransItemEntity">Entity</param>
        /// <returns>true Update Succeed; false Update Fail</returns>
        public static bool UpdateInvMtrlTransItem(InvMtrlTransItemEntity objInvMtrlTransItemEntity)
        {
            return DataAccess.Update(objInvMtrlTransItemEntity);
        }

        public static bool UpdateInvMtrlTransItem(List<InvMtrlTransItemEntity> objInvMtrlTransItemEntityList)
        {
            return DataAccess.Update<InvMtrlTransItemEntity>(objInvMtrlTransItemEntityList);
        }
        #endregion


        #region Delete
        /// <summary>
        /// Delete Data
        /// </summary>
        /// <param name="objInvMtrlTransItemEntity">Entity</param>
        /// <returns>true Delete Succeed; false Delete Fail</returns>
        public static bool DeleteInvMtrlTransItem(InvMtrlTransItemEntity objInvMtrlTransItemEntity)
        {
            return DataAccess.Delete(objInvMtrlTransItemEntity);
        }

        public static bool DeleteInvMtrlTransItem(List<InvMtrlTransItemEntity> objInvMtrlTransItemEntityList)
        {
            return DataAccess.Delete<InvMtrlTransItemEntity>(objInvMtrlTransItemEntityList);
        }
        #endregion


        #region GetAll
        /// <summary>
        /// Get All Data
        /// </summary>
        /// <returns>Back All Data<returns>
        public static DataSet GetInvMtrlTransItemAll()
        {
            return DataAccess.SelectAllDataSet<InvMtrlTransItemEntity>();
        }
        /// <summary>
        /// Get All Data List
        /// </summary>
        /// <returns>Back All Data List<returns>
        public static List<InvMtrlTransItemEntity> GetInvMtrlTransItemAllList()
        {
            return DataAccess.SelectAll<InvMtrlTransItemEntity>();
        }
        #endregion


        public static List<InvMtrlTransItemEntity> GetInvMtrlTransItemByTransNo(string transNo)
        {
            return DataAccess.Select<InvMtrlTransItemEntity>(new InvMtrlTransItemEntity {  TransNo=transNo});
        }
    }


}

